<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ include file="/common/taglibs.jsp" %>
<c:set var="lastYear" scope="request"><x:out select="$xmlData/data/proposal/last_year"/></c:set>
<c:set var="curryear">${param.curryear}</c:set>

<table id="basicProjectInfo" border="0" cellspacing="0" cellpadding="0" class="table01 t_css">
    <col style="width:15%"/>
    <col style="width:15%"/>
    <col style="width:20%"/>
    <col style="width:15%"/>
    <col style="width:15%"/>
    <col style="width:20%"/>
    <tr>
        <td colspan="1" align="right"><span class="color_red">*</span>需求名称：</td>
        <td colspan="5">
            <input type='text' name='proposal/zh_title' onchange="reqName()" id='zh_title' style="width: 98%"
                   class="input_css required "  maxlength="100"  value='<x:out select="$xmlData/data/proposal/zh_title"/>' label="需求名称">
        </td>
    </tr>
    <tr>
        <td align="right" colspan="1"><span class="color_red">*</span>归口管理部门：</td>
        <td colspan="2">
            <c:set var="recomend_org">
                {'id':'<x:out select="$xmlData/data/proposal/recomend_org_value"/>',
                'name':'<x:out select="$xmlData/data/proposal/recomend_org_name"/>'
                }
            </c:set>
            <cpt:tree id="recomend_org" key="recommended_org" cacheable="false"
                      className="hn_iuput_kuang required selectWidth3" readonly="true"
                      value="${recomend_org}" label="归口管理部门" showPattern="all"
                      shieldPattern="0" onClick="initTreeValue2">
            </cpt:tree>
            <input type="hidden" id="recomend_org_value"
                   name="proposal/recomend_org_value"
                   value="<x:out select="$xmlData/data/proposal/recomend_org_value" />"/>
            <input type="hidden" name="proposal/recomend_org_name"
                   value="<x:out select="$xmlData/data/proposal/recomend_org_name" />"/>
        </td>
        <td align="right" colspan="1"><span class="color_red">*</span>申报日期：</td>
        <td colspan="2">
            <c:set var="submit_date"><x:out select="$xmlData/data/proposal/submit_date"/></c:set>
            <cpt:date id="submit_date" name="proposal/submit_date" value="${submit_date}" className=" required date"
                      label="申报日期"></cpt:date>
        </td>
    </tr>

    <tr>
        <td align="right" colspan="1" rowspan="2"><span class="color_red">*</span>联系人：</td>
        <td align="right" colspan="1">项目联系人：</td>
        <td colspan="1">
            <input name="proposal/contact_psn_cname" style="width: 80%" label="联系人项目联系人" class="input_css required"  maxlength="20" value="<x:out select="$xmlData/data/proposal/contact_psn_cname" />">
        </td>
        <td align="right" colspan="1">联系电话：</td>
        <td colspan="2">
            <input type="text" label="联系人联系电话" name="proposal/contact_psn_tel"
                   class="required" maxlength="30" style="width: 60%"
                   value="<x:out select="$xmlData/data/proposal/contact_psn_tel" />">
        </td>
    </tr>
    <tr>
        <td align="right" colspan="1">手机号码：</td>
        <td colspan="1">
            <input type="text" label="联系人手机号码" name="proposal/contact_psn_mobile" style="width: 80%"
                   class="input_css required mobile" maxlength="11" onfocus="InitInput.setNumber(this,11,0,0)"
                   value="<x:out select="$xmlData/data/proposal/contact_psn_mobile" />">
        </td>
        <td align="right" colspan="1">电子邮箱：</td>
        <td colspan="2">
            <input name="proposal/email_address" label="联系人电子邮箱" style="width: 60%"
                   type="text" required class="required email" maxlength="50"
                   value="<x:out select="$xmlData/data/proposal/email_address" />" />
        </td>
    </tr>


    <tr>
        <td  align="right" ><span class="color_red">*</span>重点领域：</td>
        <td  colspan="5" align="left" >
            <c:set var="applicant_subject_value"><x:out select="$xmlData/data/proposal/applicant_subject_value" /></c:set>
            <c:set var="appl_sub_params">
                {'grant_code':'<x:out select="$xmlData/data/proposal/sub_grant_code" />','stat_year':'${statYear}'}
            </c:set>
            <input name="proposal/applicant_subject_value" style="width: 98%" type="hidden" value="<x:out select="$xmlData/data/proposal/applicant_subject_value" />" class="required " label="重点领域"/>
            <input name="proposal/applicant_subject_name" type="hidden" value="<x:out select="$xmlData/data/proposal/applicant_subject_name" />" />
            <cpt:select style="width: 100%;" id="applicant_subject" key="applicant_subject" className="selectWidth2" onChange="initControlValue('applicant_subject')" value="${applicant_subject_value}" sqlParamVal="${appl_sub_params}"></cpt:select>
        </td>
    </tr>


    <tr>
        <td align="right" colspan="1"><span class="color_red">*</span>项目分类：</td>
        <td colspan="5">
            <c:set var="project_classification"><x:out select="$xmlData/data/proposal/project_classification_value" /></c:set>
            <cpt:checkbox key="Project_classification" name="project_classification" repeatColumn="2"  value="${project_classification}" tagType="radio" className="required "></cpt:checkbox>
            <input type="hidden" label="项目分类" name="proposal/project_classification_value" class="required"
                   value="<x:out select="$xmlData/data/proposal/project_classification_value" />" />
            <input type="hidden" name="proposal/project_classification_name"
                   value="<x:out select="$xmlData/data/proposal/project_classification_name" />" />
        </td>
    </tr>
    <tr>
        <td colspan="1" align="right"><span class="color_red">*</span>背景意义：</td>
        <td colspan="5">
            <span>从与国家和我省重大战略实施的直接关系，实现安全自主可控、抢占技术制高点的关键性作用，提升产业竞争力、前沿技术突破的重大影响等角度，说明此项需求的攻关背景和意义。（限400字左右）</span>
            <textarea id="project_fzr1" name="proposal/project_fzr1" style="width:98%" class="input_textarea required maxlength:400" label="背景意义-->从与国家和我省重大战略实施的直接关系，实现安全自主可控、抢占技术制高点的关键性作用，提升产业竞争力、前沿技术突破的重大影响等角度，说明此项需求的攻关背景和意义"  rows=15 cols=60 ><x:out select="$xmlData/data/proposal/project_fzr1" /></textarea>
            <input type="hidden" name="proposal/project_fzr1_hidden" id="project/project_fzr1_hidden"  value="<x:out select="$xmlData/data/proposal/project_fzr1_hidden" />"/>
        </td>
    </tr>
    <tr>
    <td align="right" colspan="1"><span class="color_red">*</span>拟解决的问题：</td>
    <td colspan="2">
        <c:set var="solve_problems"><x:out select="$xmlData/data/proposal/solve_problems_value" /></c:set>
        <cpt:checkbox key="solve_Problems" name="solve_problems" value="${solve_problems}" repeatColumn="4" tagType="radio" style="border: 0px; padding: 0px; margin: 0px;" ></cpt:checkbox>
        <input type="hidden" name="proposal/solve_problems_value" id="solve_problems_value" value="<x:out select="$xmlData/data/proposal/solve_problems_value" />" class="required" label="拟解决的问题"/>
        <input type="hidden"   name="proposal/solve_problems_name" value="<x:out select="$xmlData/data/proposal/solve_problems_name" />" />
    </td>
    <td align="right" colspan="1"><span class="color_red">*</span>问题描述:</td>
        <td colspan="2">
            <input  type="text" label="问题描述" name="medicine/expert_post" class="input_css required maxlength：100" value="<x:out select="$xmlData/data/medicine/expert_post" />">
        </td>
    <tr>
        <td colspan="1" align="right"><span class="color_red">*</span>攻关目标：</td>
        <td colspan="5">
            <span>预计达到的目标（200字以内）</span>
            <textarea id="project_fzr2" name="proposal/project_fzr2" style="width:98%" class="input_textarea required maxlength:200" label="攻关目标-->预计达到的目标"  rows=15 cols=60 ><x:out select="$xmlData/data/proposal/project_fzr2" /></textarea>
            <input type="hidden" name="proposal/project_fzr2_hidden" id="project/project_fzr2_hidden"  value="<x:out select="$xmlData/data/proposal/project_fzr2_hidden" />"/>
        </td>
    </tr>
    <tr>
        <td colspan="1" align="right">研发内容：</td>
        <td colspan="5">
            <span>如有较为成熟的思考，从科技创新角度破解相关问题的具体建议，如可能的技术路径、技术方案要点等。（限500字）</span>
            <textarea id="project_fzr3" name="proposal/project_fzr3" style="width:98%" class="input_textarea maxlength:500" label="研发内容"  rows=15 cols=60 ><x:out select="$xmlData/data/proposal/project_fzr3" /></textarea>
            <input type="hidden" name="proposal/project_fzr3_hidden" id="project/project_fzr3_hidden"  value="<x:out select="$xmlData/data/proposal/project_fzr3_hidden" />"/>
        </td>
    </tr>
    <tr>
        <td colspan="1" align="right" rowspan="7">预期标志性成果及水平：</td>
        <td colspan="5">
            <span><span class="color_red">*</span>从引领性技术储备和突破、国产化替代、成果产业化应用等说明预期标志性成果。（限200字）</span>
            <textarea id="project_fzr4" name="proposal/project_fzr4" style="width:98%" class="input_textarea required maxlength:200" label="预期标志性成果及水平-->从引领性技术储备和突破、国产化替代、成果产业化应用等说明预期标志性成果"  rows=15 cols=60 ><x:out select="$xmlData/data/proposal/project_fzr4" /></textarea>
            <input type="hidden" name="proposal/project_fzr4_hidden" id="project/project_fzr4_hidden"  value="<x:out select="$xmlData/data/proposal/project_fzr4_hidden" />"/>
        </td>
    </tr>

    <tr>
        <td align="right"><span class="color_red">*</span>技术先进水平：</td>
        <td colspan="4">
            <c:set var="advanced_technology"><x:out select="$xmlData/data/proposal/advanced_technology_value" /></c:set>
            <cpt:checkbox key="Advanced_technology" name="advanced_technology" value="${advanced_technology}" repeatColumn="4" tagType="radio" style="border: 0px; padding: 0px; margin: 0px;" ></cpt:checkbox>
            <input type="hidden" name="proposal/advanced_technology_value" id="advanced_technology_value" value="<x:out select="$xmlData/data/proposal/advanced_technology_value" />" class="required" label="预期标志性成果及水平-->技术先进水平"/>
            <input type="hidden" name="proposal/advanced_technology_name" value="<x:out select="$xmlData/data/proposal/advanced_technology_name" />" />
        </td>
    </tr>
    <tr>
        <td align="right"><span class="color_red">*</span>攻关成果性质：</td>
        <td colspan="4">
            <c:set var="key_achievements"><x:out select="$xmlData/data/proposal/key_achievements_value" /></c:set>
            <cpt:checkbox key="key_achievements" name="key_achievements" value="${key_achievements}" repeatColumn="4" tagType="radio" style="border: 0px; padding: 0px; margin: 0px;" ></cpt:checkbox>
            <input type="hidden" name="proposal/key_achievements_value" id="key_achievements_value" value="<x:out select="$xmlData/data/proposal/key_achievements_value" />" class="required" label="预期标志性成果及水平-->攻关成果性质"/>
            <input type="hidden" name="proposal/key_achievements_name" value="<x:out select="$xmlData/data/proposal/key_achievements_name" />" />
        </td>
    </tr>
    <tr>
        <td colspan="1" align="right" >对标单位及产品（型号）：</td>
        <td colspan="4">
            <span>（如有，请填写国别、单位及产品型号，如无请填无）</span>
            <textarea id="project_fzr5" name="proposal/project_fzr5" style="width:98%"   class="input_textarea maxlength:300" label="对标单位及产品（型号）"  rows=15 cols=60 ><x:out select="$xmlData/data/proposal/project_fzr5" /></textarea>
            <input type="hidden" name="proposal/project_fzr5_hidden" id="project/project_fzr5_hidden"  value="<x:out select="$xmlData/data/proposal/project_fzr5_hidden" />"/>
        </td>
    </tr>
    <tr>
        <td align="right" rowspan="2"><span class="color_red">*</span>核心技术参数（3项以上）：</td>
        <td colspan="4">对标产品（技术）：
            <input type="text" name="proposal/dbcp" maxlength="200" class="required post" label="预期标志性成果及水平-->核心技术参数-->对标产品（技术）" id="dbcp"  onchange="reqName()"
                    value="<x:out select="$xmlData/data/proposal/dbcp" />"/>
        </td>

    </tr>
    <tr>
        <td colspan="4">研发产品（技术）：
            <input type="text" name="proposal/yfcp" maxlength="200" class="required post"  label="预期标志性成果及水平-->核心技术参数-->研发产品（技术）"  id="yfcp"
                   value="<x:out select="$xmlData/data/proposal/yfcp" />"/>
        </td>
    </tr>
    <tr>
        <td align="right"><span class="color_red">*</span>攻关水平：</td>
        <td colspan="4">
            <c:set var="level_problems"><x:out select="$xmlData/data/proposal/level_problems_value" /></c:set>
            <cpt:checkbox key="Level_problems"  name="level_problems" value="${level_problems}" style="border: 0px; padding: 0px; margin: 0px;" repeatColumn="3" tagType="checkbox" ></cpt:checkbox>
            <input type="hidden" name="proposal/level_problems_value" id="level_problems_value" value="<x:out select="$xmlData/data/proposal/level_problems_value" />" class="required" label="预期标志性成果及水平-->攻关水平"/>
            <input type="hidden" name="proposal/level_problems_name" value="<x:out select="$xmlData/data/proposal/level_problems_name" />" />
        </td>
    </tr>
    <tr>
        <td align="right" colspan="1"><span class="color_red">*</span>攻关时限：</td>
        <td colspan="5">
            <c:set var="time_limit"><x:out select="$xmlData/data/proposal/time_limit_value" /></c:set>
            <cpt:checkbox key="Time_limit" name="time_limit" value="${Project_type}" repeatColumn="4" tagType="radio" style="border: 0px; padding: 0px; margin: 0px;" ></cpt:checkbox>
            <input type="hidden" name="proposal/time_limit_value" id="time_limit_value" value="<x:out select="$xmlData/data/proposal/time_limit_value" />" class="required" label="攻关时限"/>
            <input type="hidden" name="proposal/time_limit_name" value="<x:out select="$xmlData/data/proposal/time_limit_name" />" />
        </td>
    </tr>
    <tr>

        <td align="right"><span class="color_red">*</span>建议研发总投入（万元）：</td>
        <td colspan="5">
            <input type="text" name="proposal/request_money1" class="required" id="request_amount" onfocus="InitInput.setNumber(this,9,2,2)" style="text-align: right;"
                   value="<x:out select="$xmlData/data/proposal/request_money1"/>" label="建议研发总投入（万元）" onchange="synchronizationAmount();"
            >
        </td>
    </tr>
    <tr>
        <td align="right" colspan="1"><span class="color_red">*</span>支持方式：</td>
        <td colspan="5">
            <c:set var="support"><x:out select="$xmlData/data/proposal/support_value" /></c:set>
            <cpt:checkbox key="Support" name="support" value="${support}" repeatColumn="4" tagType="radio" style="border: 0px; padding: 0px; margin: 0px;" ></cpt:checkbox>
            <input type="hidden" name="proposal/support_value" id="support_value" value="<x:out select="$xmlData/data/proposal/support_value" />" class="required" label="支持方式"/>
            <input type="hidden" name="proposal/support_name" value="<x:out select="$xmlData/data/proposal/support_name" />" />
        </td>
    </tr>

    <tr>
        <td colspan="1" align="right"><span class="color_red">*</span>可依托的攻关单位、企业、平台或人才团队（选填其中可潜在攻关的技术力量）：</td>
        <td colspan="5">
            <textarea id="project_fzr6" name="proposal/project_fzr6" style="width:98%" class="input_textarea required maxlength:200" label="可依托的攻关单位、企业、平台或人才团队（选填其中可潜在攻关的技术力量）"  rows=15 cols=60 ><x:out select="$xmlData/data/proposal/project_fzr6" /></textarea>
            <input type="hidden" name="proposal/project_fzr6_hidden" id="project/project_fzr6_hidden"  value="<x:out select="$xmlData/data/proposal/project_fzr6_hidden" />"/>
        </td>
    </tr>
    <tr>
        <td colspan="1" align="right"><span class="color_red">*</span>攻关成果潜在的应用单位：</td>
        <td colspan="5">
            <textarea id="project_fzr7" name="proposal/project_fzr7" style="width:98%" class="input_textarea required maxlength:200" label="攻关成果潜在的应用单位"  rows=15 cols=60 ><x:out select="$xmlData/data/proposal/project_fzr7" /></textarea>
            <input type="hidden" name="proposal/project_fzr7_hidden" id="project/project_fzr7_hidden"  value="<x:out select="$xmlData/data/proposal/project_fzr7_hidden" />"/>
        </td>
    </tr>

</table>

<script>
    function initTreeValueTeamPerson(treeId, treeNode) {
        //针对单位性质
        if (( treeNode && treeNode.isParent)) {
            scmWarn("请选择具体的"+$("#" + treeId).attr("label"));
            $("#" + treeId).val("");
            $("#" + treeId).parents("td").find("[name$='" + treeId + "_code'],[id$='" + treeId+ "_code']").val("");
            $("#" + treeId).parents("td").find("[name$='" + treeId + "_value'],[id$='" + treeId+ "_value']").val("");
            $("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId+ "_name']").val("");
            return false;
        }
        var str = treeNode.name.split("-")[0];
        var obj = treeNode.parentNode;
        while (obj != null) {
            //str = obj.name + "-" + str;
            obj = obj.parentNode;
        }
        $("#" + treeId).parents("td").find("[name$='" + treeId + "_code'],[id$='" + treeId + "_code']").val(treeNode.id);
        $("#" + treeId).parents("td").find("[name$='" + treeId + "_value'],[id$='" + treeId + "_value']").val(treeNode.id);
        $("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId + "_name']").val(str);
        $("#" + treeId).val(str);
        initTreeValue2CallBack();
    }
    function synchronizationAmount(){
        var request_amount=$("#request_amount").val();
        if(request_amount !=  ""){
            $("#total_each_0").val(parseFloat($("#request_amount").val()).toFixed(2));

            countFundAuto('total_','each_0,each_1,each_2,each_4','investfrom_5');
        }else if(request_amount ==  ""){
            $("#total_each_0").val("");
            countFundAuto('total_','each_0,each_1,each_2,each_4','investfrom_5');
        }

    }
</script>